package com.zyl.points;

 
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import com.zyl.points.util.FileUtil;


public class Data extends Activity {
	
	private ListView list;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.data);
   	    String SDPATH = Environment.getExternalStorageDirectory().getPath(); 
        FileUtil.listFile(SDPATH);
        
        list=(ListView)findViewById(R.id.dataList);
        
        SimpleAdapter adapter = new SimpleAdapter(this,FileUtil.listFile(SDPATH),R.layout.datalist,new String[] {"file"},
        		new int[] {R.id.item}
        );
        list.setAdapter(adapter);
    }
}